from django.db import models
#from settings import MEDIA_ROOT
from django.contrib.auth.models import User
from datetime import datetime    
from django.template.defaultfilters import slugify
from l2ldjango.apps.blog.models import * 
class PersonalBlogComments(models.Model):
    creation_date = models.DateTimeField(verbose_name='creation date', auto_now_add=True)
    commented_by=models.ForeignKey(User,null=True,blank=True)
    comment=models.TextField(null=False,blank=False,verbose_name="Comment Here *")
    
         
class PersonalBlog(Blog):
    """Base design for publishing Blog"""
    added_by=models.ForeignKey(User,null=True,blank=True,related_name='personal_blogs')
    blog_comments=models.ManyToManyField(PersonalBlogComments,verbose_name='Comments')
    visible_to_all=models.BooleanField(verbose_name='Visibility to public',default=False)